package com.framework.Module.jxc.jxcbase;

import com.framework.Table.Table;
import com.framerock.baselib.Rock;


public class Tablejxcbase extends Table {

 

    protected void initTable() {
        this.tablename   = "jxcbase";
        this.tablenamesm = "商品管理";

        this.flowsetMap  = Rock.getMap(new String[]{
                "type", "进销存",
                "sort", "50",
                "isxt", "2",
                "summary", "{num}.{name}",
                "imgurl","https://xinhu-1251238447.file.myqcloud.com/img/shop.png",
                "istj","1"
        });

        this.addfields("num", "varchar(30)", "", "编号@@唯一的编号", new String[]{
                "isbt","1",
                "isss","1",
                "isonly","1"
        });
        this.addfields("typeid", "int(11)", "0", "对应分类@jxcbasetype,id,tree", new String[]{
                "isbt","1",
                "fieldstype","rockcombo"
        });
        this.addfields("name", "varchar(100)", "", "名称", new String[]{
                "isbt","1",
                "isss","1",
                "isalign","1"
        });
        this.addfields("xinghao", "varchar(50)", "", "型号", new String[]{
                "isss","1",
        });
        this.addfields("guige", "varchar(50)", "", "规格", new String[]{
                "isss","1",
        });
        this.addfields("price", "decimal(10,2)", "0.00", "单价", new String[]{
                "isalign","2"
        });
        this.addfields("prices", "decimal(10,2)", "0.00", "销售价", new String[]{
                "isalign","2"
        });
        this.addfields("unit", "varchar(20)", "", "单位@jxcbaseunit", new String[]{
                "isbt","1",
                "fieldstype","rockcombo"
        });
        this.addfields("cid", "int(11)", "0", "对应单位", new String[]{
                "islu","0",
                "notelement","1"
        });
        this.addfields("explain", "varchar(500)", "", "说明", new String[]{
                "islb","0",
                "fieldstype","textarea"
        });
        this.addfields("sort", "int(11)", "0", "序号", new String[]{
                "ispx","1",
                "iseditlx","2"
        });
        this.addfields("stock", "decimal(10,2)", "0.00", "总库存", new String[]{
                "islu","0",
                "ispx","1",
                "isalign","2"
        });
        this.addfields("fengmian", "varchar(200)", "", "封面", new String[]{
                "fieldstype","uploadimg"
        });
        this.addfields("cid", "KEY", "`cid`", "单位ID");

        this.addWhere("所有商品", "all", "1=1");
        this.addWhere("库存少于10", "allx10", "`stock`<10");
    }

}
